package cn.ibizlab.util.adapter.service.impl;

import cn.ibizlab.util.adapter.service.SysRuntimeModelService;
import net.ibizsys.central.database.SysDBPersistentAdapter;
import net.ibizsys.central.dataentity.IDataEntityRuntime;
import net.ibizsys.central.util.IEntity;

import java.util.List;
import java.util.Map;

public class DefaultAdapterDBPersistentAdapter extends SysDBPersistentAdapter {

    @Override
    protected Object executeInsert(String strTableName, List<Map<String, Object>> args, Map<String, Object> extParamMap, IDataEntityRuntime iDataEntityRuntime, List<? extends IEntity> datas, boolean bSysMode) throws Throwable {
        return SysRuntimeModelService.getSysRuntimeAdapterService().executeInsert(iDataEntityRuntime, args);
    }

    @Override
    protected Object executeInsert(String strTableName, Map<String, Object> arg, Map<String, Object> extParamMap, IDataEntityRuntime iDataEntityRuntime, IEntity iEntity, boolean bSysMode) throws Throwable {
        return SysRuntimeModelService.getSysRuntimeAdapterService().executeInsert(iDataEntityRuntime, arg);
    }

    @Override
    protected Object executeUpdate(String strTableName, List<Map<String, Object>> args, Map<String, Object> extParamMap, IDataEntityRuntime iDataEntityRuntime, List<? extends IEntity> datas, boolean bSysMode) throws Throwable {
        return SysRuntimeModelService.getSysRuntimeAdapterService().executeUpdate(iDataEntityRuntime, args);
    }

    @Override
    protected Object executeUpdate(String strTableName, Map<String, Object> arg, Map<String, Object> extParamMap, IDataEntityRuntime iDataEntityRuntime, IEntity iEntity, boolean bSysMode) throws Throwable {
        return SysRuntimeModelService.getSysRuntimeAdapterService().executeUpdate(iDataEntityRuntime, arg);
    }

}
